﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Controls="clr-namespace:RegistryConfiguration">
    <Style TargetType="{x:Type ListBoxItem}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListBoxItem}">
                    <ContentPresenter/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
    <!--BEGIN WINDOW-->
    <Style x:Key="ControlWindow" TargetType="Window">
        <Setter Property="WindowStyle" Value="None"/>
        <Setter Property="WindowState" Value="Normal"/>
        <Setter Property="AllowsTransparency" Value="True"/>
        <Setter Property="Width" Value="1024"/>
        <Setter Property="Height" Value="734"/>
        <Setter Property="MinWidth" Value="255"/>
        <Setter Property="MinHeight" Value="150"/>
        <Setter Property="ResizeMode" Value="CanResizeWithGrip"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Window">
                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"/>
                        </Grid.RowDefinitions>
                        <!--Begin Border and Background Effects-->
                        <Rectangle Stroke="{DynamicResource BrushWindowBorder}" StrokeThickness="1.5" RadiusX="12" RadiusY="12" Fill="White" Opacity="1"/>
                        <Rectangle Stroke="{DynamicResource BrushWindowBorder}" StrokeThickness="1.5" RadiusX="12" RadiusY="12" Opacity="0.4" Visibility="Visible" Fill="White"/>
                        <Path Opacity="0.8" VerticalAlignment="Top" Height="327" Stretch="Fill" Stroke="{x:Null}" StrokeThickness="1.5" Data="M12.749991,0.75 L1011.25,0.75 C1017.8774,0.75000733 1023.25,6.1225902 1023.25,12.750007 L1023.25,326.25001 0.75,326.25001 0.75,12.750007 C0.74999899,6.1225902 6.1225819,0.75000733 12.749991,0.75 z" Fill="{DynamicResource BrushWindowTopEffect}"/>
                        <Rectangle Stroke="{DynamicResource BrushWindowBorder}" StrokeThickness="1.5" RadiusX="12" RadiusY="12" Fill="White"/>
                        <Border Margin="7.5,32.424,5.5,16" Background="{DynamicResource IconWindowBackgroundEffect}" BorderBrush="#FF000000" BorderThickness="1.3,1.3,1.3,1.3" CornerRadius="12,0,12,12"/>
                        <Path RenderTransformOrigin="6.72175977802443,0.502279088071722" HorizontalAlignment="Right" Margin="0,5,233.913,0" VerticalAlignment="Top" Width="18.356" Height="30" Stretch="Fill" Stroke="#FF000000" StrokeThickness="1.3" Data="M0.65,29.719362 L0.65,12.627611 C0.65,6.0040048 2.8406345,0.6505064 10.577699,0.65049168 L17.70598,0.65 17.70598,29.980949">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="0.5,0.937" StartPoint="0.5,-0.039">
                                    <GradientStop Color="#FFC6C6C6" Offset="0.254"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                            <Path.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="-1" ScaleY="1"/>
                                    <SkewTransform AngleX="0" AngleY="0"/>
                                    <RotateTransform Angle="0"/>
                                    <TranslateTransform X="0" Y="0"/>
                                </TransformGroup>
                            </Path.RenderTransform>
                        </Path>
                        <Path HorizontalAlignment="Left" Margin="155,5,0,0" VerticalAlignment="Top" Width="12.965" Height="30" Stretch="Fill" Stroke="#FF000000" StrokeThickness="1.3" Data="M0.65,29.855425 L0.65,12.673599 C0.64999958,6.0648215 3.2304065,0.71393683 12.314998,0.65 L12.314998,29.834117" x:Name="redondo">
                            <Path.Fill>
                                <LinearGradientBrush EndPoint="0.5,0.937" StartPoint="0.5,-0.039">
                                    <GradientStop Color="#FFC6C6C6" Offset="0.254"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                            </Path.Fill>
                        </Path>
                        <Border Margin="165.75,5,20,0" VerticalAlignment="Top" Height="30" BorderBrush="#FF000000" BorderThickness="0,1.3,0,0">
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFC6C6C6" Offset="0.188"/>
                                    <GradientStop Color="#FFFFFFFF" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.Background>
                        </Border>
                        <Path Stretch="Fill" Stroke="{DynamicResource BrushWindowBorder}" StrokeThickness="1.3" Margin="6.782,4.084,5.5,14.844" Data="{DynamicResource IconWindowContour}" Fill="{DynamicResource BrushWindowContourBackground}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Opacity="0"/>
                        <!--End Border and Background Effects-->


                        <Rectangle Stroke="{x:Null}" StrokeThickness="1" RadiusX="0" RadiusY="0" Margin="72.647,0,22.556,0" VerticalAlignment="Bottom" Height="16" Fill="{DynamicResource BrushWindowRectangleBottomBackground}"/>

                        <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <!--Begin Logo Area-->
                            <Grid x:Name="Header1" Grid.Row="0" Grid.Column="0" Margin="20,5,0,0" Height="25.476" Width="119.109" VerticalAlignment="Top" HorizontalAlignment="Left">
                                <Rectangle Fill="{DynamicResource IconLogoSinacor}" Width="28.546" Height="28" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                <Rectangle Fill="{DynamicResource IconNameSinacorBlack}" Width="87" Height="20" Margin="34,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
                            </Grid>
                            <!--End Logo Area-->


                            <!--Begin Header Info Area-->
                            <Grid x:Name="Header2" Grid.Row="0" VerticalAlignment="Top" Margin="170,10,70,0" Height="30" HorizontalAlignment="Stretch">
                                <Grid.Resources>
                                    <Style TargetType="{x:Type ToolTip}">
                                        <Setter Property="OverridesDefaultStyle" Value="true"/>
                                        <Setter Property="VerticalOffset" Value="-2" />
                                        <Setter Property="FontSize" Value="10" />
                                        <Setter Property="FontFamily" Value="Tahoma" />
                                        <Setter Property="Panel.ZIndex" Value="99" />
                                        <Setter Property="Foreground" Value="{DynamicResource BrushTooltipForeground}" />
                                        <Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="{x:Type ToolTip}">
                                                    <Grid Name="Border" Background="Transparent" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Margin="{TemplateBinding Margin}">
                                                        <Rectangle Margin="1.926,3.465,0.878,0" Fill="{DynamicResource BrushTooltipShadowBackground}" Stroke="{x:Null}" RadiusX="3" RadiusY="3" x:Name="shadow" Height="35.84" VerticalAlignment="Top"/>
                                                        <Rectangle Stroke="{DynamicResource BrushTooltipBorder}" RadiusX="3" RadiusY="3" x:Name="back" Height="37.07" VerticalAlignment="Top" Margin="0,0,2.609,0" Fill="{DynamicResource BrushTooltipBackground}"/>
                                                        <ContentPresenter Margin="5,-4,8,0" HorizontalAlignment="Center" VerticalAlignment="Center" />
                                                    </Grid>
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </Grid.Resources>
                                <Grid.ToolTip>
                                    <WrapPanel Orientation="Vertical">
                                        <WrapPanel Orientation="Horizontal" Margin="0,2,0,0">
                                            <Label Content="Banco de Dados" Margin="0,-3,1,0" Style="{DynamicResource ControlFont}" FontSize="11" Foreground="{DynamicResource BrushWindowHeaderForeground}"/>
                                        </WrapPanel>
                                    </WrapPanel>
                                </Grid.ToolTip>
                                <Grid HorizontalAlignment="Left" x:Name="IconInfoWindow" Width="10" Height="24" Margin="0,0,0,1.5">
                                    <Rectangle Fill="{DynamicResource BrushWindowHeaderIconBackground}" Stroke="{x:Null}" StrokeThickness="0" RadiusX="4" RadiusY="4" x:Name="back"/>
                                    <Path Stretch="Fill" Fill="{DynamicResource BrushWindowHeaderIconArrowBackground}" Data="{DynamicResource IconWindowHeaderArrow}" Margin="2.048,8.591,2.048,8.592" x:Name="arrow"/>
                                </Grid>
                                <WrapPanel Orientation="Horizontal" Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Stretch">
                                    <Label Content="Banco de Dados" Margin="0,-3,1,0" Style="{DynamicResource ControlFont}" FontSize="11" Panel.ZIndex="1500" Foreground="{DynamicResource BrushWindowHeaderForeground}" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch"/>
                                </WrapPanel>
                            </Grid>
                            <!--End Header Info Area-->


                            <!--Begin Window Buttons-->
                            <Grid x:Name="Header3" Grid.Row="0" Height="40.125" VerticalAlignment="Top" Width="111.3" HorizontalAlignment="Right">
                                <Button HorizontalAlignment="Right" Margin="0,15.389,50.576,0" Style="{DynamicResource ControlButtonMinimize}" VerticalAlignment="Top" Content="Button" RenderTransformOrigin="0.453,0.504" Command="Controls:SinacorWindowCommands.Minimize" IsTabStop="False"/>
                                <Button x:Name="ButtonMaximize" HorizontalAlignment="Right" Margin="0,15.389,33.674,0" Style="{DynamicResource ControlButtonMaximize}" VerticalAlignment="Top" Content="Button" Visibility="Collapsed" Command="Controls:SinacorWindowCommands.Maximize" IsTabStop="False"/>
                                <Button x:Name="ButtonRestore" HorizontalAlignment="Right" Margin="0,15.389,33.674,0" Style="{DynamicResource ControlButtonRestore}" VerticalAlignment="Top" Content="Button" Command="Controls:SinacorWindowCommands.Restore" IsTabStop="False"/>
                                <Button HorizontalAlignment="Right" Margin="0,15.389,16.772,0" Style="{DynamicResource ControlButtonClose}" VerticalAlignment="Top" Command="Controls:SinacorWindowCommands.Close" IsTabStop="False"/>
                            </Grid>
                            <!--End Window Buttons-->

                            <!--Begin Window Content Area-->
                            <Grid Margin="19,44,17,27" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="Transparent">
                                <AdornerDecorator VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
                                    <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"/>
                                </AdornerDecorator>
                            </Grid>

                            <Grid VerticalAlignment="Bottom" HorizontalAlignment="Right">
                                <ResizeGrip x:Name="Grip" Margin="0,0,3.5,3" VerticalAlignment="Bottom" HorizontalAlignment="Right" IsTabStop="False"/>
                            </Grid>
                            <!--End Window Content Area-->
                        </Grid>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="WindowState" Value="Maximized">
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMaximize"/>
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonRestore"/>
                            <Setter Property="Visibility" Value="Collapsed" TargetName="Grip"/>
                        </Trigger>
                        <Trigger Property="WindowState" Value="Normal">
                            <Setter Property="Visibility" Value="Visible" TargetName="ButtonMaximize"/>
                            <Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
                        </Trigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="WindowState" Value="Normal"/>
                                <Condition Property="ResizeMode" Value="CanResizeWithGrip"/>
                            </MultiTrigger.Conditions>
                            <Setter Property="Visibility" Value="Visible" TargetName="Grip"/>
                        </MultiTrigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ControlWindowHeaderPath" TargetType="ListBoxItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <WrapPanel Orientation="Horizontal" Margin="-2,1,7,15">
                        <TextBlock Text="►" FontFamily="Times New Roman" FontSize="11" Foreground="{DynamicResource BrushWindowHeaderSeparatorBackground}" Margin="0,0.5,4,0"/>
                        <TextBlock Text="{Binding .}" FontSize="11" Foreground="{DynamicResource BrushWindowHeaderForeground}" HorizontalAlignment="Right" Style="{DynamicResource ControlFont}"/>
                    </WrapPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <!--END WINDOW-->
</ResourceDictionary>

